import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class StringValidator{
	
	

	

	public boolean checkInvalidChar(String input){
		

		 Pattern regex = Pattern.compile("\\W.");
		 Matcher matcher = regex.matcher(input);
		
		 
		 return !matcher.find();
	}
	
	public boolean checkEmptyString(String input){
		
		return !input.isEmpty();
		
	}
	
	public boolean checkNull(String input){
		
		
		return input!=null;
		
		
	}
	
	public boolean checkStringLength(String input)
	{
		
		return input.length() < 30;
		
		
	}
	
	public boolean checkStringIsValid(String input){
		
		return checkInvalidChar(input) && checkEmptyString(input) && checkNull(input) && checkStringLength(input);
		
	}
	

	
	
	
	
	
	
	
}

